package com.demo.mapper;

import com.demo.entity.Student;
import com.demo.entity.StudentExample;
import com.demo.entity.StudentInfo;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface StudentMapper {
    long countByExample(StudentExample example);

    int deleteByExample(StudentExample example);

    int deleteByPrimaryKey(String id);

    int insert(Student record);

    int insertSelective(Student record);

    List<Student> selectByExample(StudentExample example);

    Student selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByExample(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByPrimaryKeySelective(Student record);

    int updateByPrimaryKey(Student record);
    //联合class表查询所有学生的信息和班级信息
    List<Student> selectAllStudentInfoInnerClass();
    
    List<StudentInfo> selectAllStudentInfo();
    
    //根据学生姓名,id和班级名称查找学生 
    List<StudentInfo> findStudentByNames(StudentInfo studentInfo);
}